package com.seuic.hnjiningposapp.hnapps.util;

import com.socks.library.KLog;

import java.math.BigDecimal;

public class MoneyUtil {

    public static String getMoney(String amount) throws NumberFormatException {
        BigDecimal decimal1 = new BigDecimal("100");
        BigDecimal decimal2 = new BigDecimal(amount);
        BigDecimal resultAmount = decimal2.multiply(decimal1);
        if (resultAmount.longValue() <= 0) {
            throw new NumberFormatException("金额最少1分");
        }
        return String.valueOf(resultAmount.longValue());
    }

}
